package restful.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.NamedQueries;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;



@Entity
@Table(name = "T_Cartoon")
@NamedQueries({
        @NamedQuery(name = "Cartoon.findAll", query = "SELECT cartoon FROM Cartoon cartoon"),
        @NamedQuery(name = "Cartoon.findByCategoryId", query = "SELECT cartoon FROM Cartoon cartoon where cartoon.category_id = :id"),
})
@Getter
@Setter
public class Cartoon extends IdEntity {
    private String code;
    private String name;
    private int category_id;
    private String description;
    private String image_url;
}

